<script setup>
import { useRouter } from 'vue-router'
const router = useRouter()
const day = () => {
  router.push('/day')
}
</script>

<template>
  <el-calendar>
    <template #date-cell="{ data }">
      <div
      @click="day"
      >
        <p :class="data.isSelected ? 'is-selected' : ''">
        {{ data.day.split('-').slice(1).join('-') }}
        {{ data.isSelected ? '✔️' : '' }}
      </p>
      </div>
    </template>
  </el-calendar>
</template>
<style lang="scss" scoped>
.is-selected {
  color: #1989fa;
}
</style>